<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!doctype html>
<html>
<head>
	<meta charset="UTF-8">

    <link rel="stylesheet" href="css/login.css">

    <script type="text/javascript" src="js/login.js"></script>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/SecurityCode.js"></script>
	<title>Homework后台管理工作平台</title>
</head>
<body>
	<div id="login_top">
		<div id="welcome">
			欢迎使用Homework后台管理工作平台
		</div>
		<div id="back">
			<a href="#">返回首页</a>
		</div>
	</div>
	<div id="login_center">
		<div id="login_area">
			<div id="login_form">
			<s:if test="#session.userId==null">
				<form id="login" name="login" action="login" method="post" autocomplete="off">
					
					<div id="login_tip">
						用户登录
					</div>
					<div><input type="text" class="username" id="username" name="username"></div>
					<div><input type="password" class="pwd" id="password" name="password"></div>
					<div id="btn_area">
						<input type="button" name="sub_btn" id="sub_btn" value="登&nbsp;&nbsp;录" onclick="form_submit(login);">&nbsp;&nbsp;
						<input type="text" class="verify" name="securityCode"
						id="chknumber" maxlength="4">
						<img src="securityCodeImage" id="Verify" style="cursor:hand" alt="看不清，换一张" width="80" height="40">
						<br><br><a href="jsp/register.jsp">&nbsp;新用户注册</a><div style="color:red">${request.message}&nbsp;</div>
					</div>
				</form>
				</s:if>
					 <s:else>
					 	<br>
					 	<p>欢迎您：<s:property value="#session.username" /></p>
					 	<br>
						<s:a href="./jsp/main.jsp" >点击进入系统！</s:a>
					 </s:else>
         
			</div>
		</div>
	</div>
	<div id="login_bottom">
		版权所有 
	</div>
</body>
</html>